package com.example.demo.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LogAspect {

	
	@Before("execution(public * com.example.demo.controller.*.*(..))")
	public void before(JoinPoint joinPoint) {
		String name = joinPoint.getSignature().getName();
		System.out.println(name+"before");
	}
	
	@After("execution(public * com.example.demo.controller.*.*(..))")
	public void after(JoinPoint joinPoint) {
		
	}
}
